<!DOCTYPE html>  
<html>  
  <head>  
    <title>Classes</title>  
  </head>
  <body>  
    <script type="text/javascript">
       //Declaring class  
       class Employee  
       {  
           x = 5;
       };
       var e1=new Employee();  
       var e2=new Employee();  
       
       document.write(e1.x+"<br>")
       document.write(e2.x+"<br>")
       
       // 未命名/匿名类
       var emp = class {
       };
       document.write(emp.name+"<br>")
       
       var emp2 = class Company{
       };
       document.write(emp2.name+"<br>")
    </script> 
  </body>  
</html>